﻿using Nemerle.Collections;
using Nemerle.Text;
using Nemerle.Utility;

using System;
using System.Collections.Generic;
using System.Linq;

namespace Nemerle2.Compiler
{
  [Record]
  public class MacroParameterInfo
  {
    public Name          : string { get; }
    public Type          : string { get; }
    public DefaulteValue : string { get; }
    public IsParamArray  : bool   { get; }
    
    public override ToString() : string
    {
      def prefix = if (IsParamArray) "params " else "";
      def suffix = if (DefaulteValue.Length > 0) $" = $DefaulteValue" else "";
      $"$prefix $Name : $Type$suffix"
    }
  }
}
